/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




@import "colors";
@import "icons";
@import "standards";

$searchResultHeight: 60px;
$borderGray: #B0B0B0;

.skype-qtip {
    border-width: 1px;
    border-style: solid;
    border-color: $borderGray;
    background-color: white;
    color: #555;
    .qtip-content {
        position: static;
    }
}

#view-aliases-button {
    @include fa-icon('circle', 'before');
    @include fa-icon('comment', 'after');
    &::before {
        font-size: 20px !important;
        position: relative;
        top: 2px;
    }
    &::after {
        float: left;
        width: 0;
        font-size: 12px !important;
        color: $titleBarButtonColor;
        /* @theme color highlight1 */
        position: relative;
        left: 9px;
        top: 5px;
    }
}

.record-aliases-dropdown-container {
    display: inline-block;
    height: 34px;
    float: right;
    position: relative;
    margin-top: 49px;
    & > .record-name {
        box-sizing: border-box;
        margin-left: 0;
        display: inline-block;
        height: 25px;
        line-height: 25px;
        margin-top: 4px;
        padding-left: 4px;
        padding-right: 4px;
        border-radius: 3px 0 0 4px;
        border: 1px solid transparent;
        margin-right: 0;
    }
    .view-aliases-button {
        box-sizing: border-box;
        background: none;
        border: none;
        height: 25px;
        position: relative;
        margin-left: -4px;
        top: -8px;
        border: 1px solid transparent;
        border-left: none;
        border-radius: 0 3px 3px 0;
        &:hover {
            background: rgb(218, 218, 218);
        }
    }
    &:hover {
        padding-right: 0;
        .record-name {
            display: inline-block;
            border: 1px solid $borderGray;
        }
        .view-aliases-button {
            display: inline-block;
            border-right: 1px solid $borderGray;
            border-top: 1px solid $borderGray;
            border-bottom: 1px solid $borderGray;
        }
    }
    & > .alias-dropdown {
        position: absolute;
        margin-top: -13px;
        min-width: 180px;
        & > span {
            display: block;
            max-height: 242px;
            overflow-y: auto;
        }
        & li {
            &:hover {
                .delete-alias-button {
                    visibility: visible;
                }
            }
            padding-top: 0;
            padding-bottom: 0 !important;
            padding-right: 15px;
            height: 22px;
            line-height: 22px;
            & > span:first-child {
                margin-right: 8px; 
                margin-top: 5px; 
                color: $darkBlue; 
                float: left;
            }
            & > .delete-alias-button {
                visibility: hidden;
                cursor: pointer;
                color: $gray;
                float: right;
                margin-top: 5px;
                font-size: 11px;
                position: relative;
                right: -8px;
            }
            &.new-alias-button,
            &.find-google-plus-profile {
                cursor: pointer;
                padding-bottom: 0;
                text-align: center;
                font-weight: bold;
                border-radius: 0;
                display: block;
                border-left: none;
                border-right: none;
                border-bottom: none;
            }
            .record-alias {
                height: 20px;
                max-width: 127px;
                display: block;
                text-overflow: ellipsis;
                overflow: hidden;
                float: left;
            }
        }
    }
}

.add-alias-dialog {
    fieldset {
        border: none;
        width: 388px;
        margin-top: 7px;
    }
    padding: 19px;
    .bs-row {
        margin-top: 10px;
        &:first-child {
            margin-top: 0px;
        }
    }
    .alias-type-cell {
        display: inline-block;
        width: 33%;
        & > span { 
            height: 20px;
            display: inline-block;
            padding-top: 5px;
            border-radius: 3px;
            padding-right: 10px;
            border: 1px solid transparent;
            &:hover, &.selected {
                border: 1px solid #d3d3d3;
            }
            span {
                color: $darkBlue; 
            }
            label, span {
                text-align: right;
                display: inline-block;
                box-sizing: border-box;
                width: 31px;
                margin-right: 7px;
                position: relative;
                top: -3px;
            }
        }
    }
}

#google-plus-profile-search-form {
    * {
        box-sizing: border-box;
    }
    .search-results-container {
        max-height: $searchResultHeight * 4;
        overflow-y: hidden;
        &:hover {
            overflow-y: auto;
        }
    }
    .search-result {
        cursor: pointer;
        margin-right: 1px;
        height: $searchResultHeight;
        * {
            display: inline-block;
        }
        padding: 5px 5px 5px 5px;
        &:hover {
            /* @theme background light_background */
            background: $lightestGray;
        }
        img {
            border-radius: 50%;
            margin-right: 23px;
        }
        .search-result-display-name {
            line-height: 47px;
            vertical-align: top;
        }
        border: 1px solid transparent; 
        &.selected {
            border: 1px solid $highlightGreen; 
            background-color: mix(white, $highlightGreen, 92%); 
            /* @theme border-color darker_highlight2 */
            /* @theme background highlight2 */
            $shadow: inset 0px 1px 3px rgba(black, 0.15);
            @include box-shadow($shadow);
            //position: absolute;
        }
    }
}
